package com.zhuang.factory.absfactory;

/**
 * @Classname AbstractFactoryProducer
 * @Description 抽象类的工厂类
 * @Date 2021/3/18 16:10
 * @Created by dell
 */

public class AbstractFactoryProducer {
    public static AbstractFactory createFactory(String choice) {
        if ("Shape".equalsIgnoreCase(choice)) {
            return new ShapeFactory();
        }
        if ("Color".equalsIgnoreCase(choice)) {
            return new ColorFactory();
        }
        return null;
    }
}
